package com.arpa.wms.domain.vo;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Map;

/**
 * <p>
 * 库存DTO
 * </p>
 *
 * @author LEO
 * @since 2020-08-04
 */
@Data
@ApiModel(value="InventoryVO对象", description="库存")
public class InventoryVO implements Serializable {


    @ApiModelProperty(value = "主键")
    private String id;

    @ApiModelProperty(value = "数据标识")
    private String code;

    @ApiModelProperty(value = "所属机构")
    private String groupCode;

    @ApiModelProperty(value = "仓库")
    private String warehouseCode;

    @ApiModelProperty(value = "仓库名称")
    private String warehouseName;

    @ApiModelProperty(value = "库区")
    private String warehouseSpaceCode;

    @ApiModelProperty(value = "库区名称")
    private String warehouseSpaceName;

    @ApiModelProperty(value = "入驻商")
    private String shipmentCode;

    @ApiModelProperty(value = "货主名称")
    private String shipmentName;

    @ApiModelProperty(value = "商品code")
    private String goodsCode;

    @ApiModelProperty(value = "商品编码")
    private String goodCode;

    @ApiModelProperty(value = "商品规格")
    private String spec;

    @ApiModelProperty(value = "商品条码")
    private String goodsBarCode;

    @ApiModelProperty(value = "商品名称")
    private String goodsName;

    @ApiModelProperty(value = "单位")
    private String goodsUnit;

    @ApiModelProperty(value = "单位名称")
    private String goodsUnitName;

    @ApiModelProperty(value = "单位名称")
    private String unitName;

    @ApiModelProperty(value = "商品保质期（天）")
    private BigDecimal expirationQuantity;

    @ApiModelProperty(value = "数量")
    private BigDecimal quantity;

    @ApiModelProperty(value = "占用数量")
    private BigDecimal useQuantity;

    @ApiModelProperty(value = "可用数量,通过： quantity - useQuantity 计算得到的")
    private BigDecimal canUseQuantity;

    @ApiModelProperty(value = "调整数量")
    private BigDecimal adjustQuantity;

    @ApiModelProperty(value = "库位标识")
    private String location;

    @ApiModelProperty(value = "库位码")
    private String locationName;

    @ApiModelProperty(value = "库位码")
    private String oldLocationName;

    @ApiModelProperty(value = "批次号")
    private String lot;

    @ApiModelProperty(value = "收货批次号")
    private String receiveLot;

    @ApiModelProperty(value = "生产日期")
    @JSONField(format="yyyy-MM-dd")
    private LocalDateTime gmtManufacture;

    @ApiModelProperty(value = "过期日期")
    @JSONField(format="yyyy-MM-dd")
    private LocalDateTime gmtExpire;

    @ApiModelProperty(value = "存货日期")
    @JSONField(format="yyyy-MM-dd")
    private LocalDateTime gmtStock;

    @ApiModelProperty(value = "供应商")
    private String supplier;

    @ApiModelProperty(value = "序列号")
    private String serialNumber;

    @ApiModelProperty(value = "扩展1")
    private String extendOne;

    @ApiModelProperty(value = "版本号")
    private Integer version;

    @ApiModelProperty(value = "扩展2")
    private String extendTwo;

    @ApiModelProperty(value = "扩展3")
    private BigDecimal extendThree;

    @ApiModelProperty(value = "扩展4")
    private BigDecimal extendFour;

    @ApiModelProperty(value = "扩展5")
    @JSONField(format = "yyyy-MM-dd")
    private LocalDateTime extendFive;

    @ApiModelProperty(value = "扩展6")
    @JSONField(format = "yyyy-MM-dd")
    private LocalDateTime extendSix;

    @ApiModelProperty(value = "锁定状态")
    private Integer isLock;

    @ApiModelProperty(value = "锁定状态名称")
    private String lockName;

    @ApiModelProperty(value = "库存状态")
    private String status;

    @ApiModelProperty(value = "库存状态")
    private String goodsStatus;

    @ApiModelProperty(value = "库存状态")
    private String goodsStatusName;

    @ApiModelProperty(value = "备注")
    private String remarks;

    @ApiModelProperty(value = "商品编码")
    private String productCode;

    @ApiModelProperty(value = "库存状态")
    private String inventoryStatus;

    @ApiModelProperty(value = "总数")
    private Long total;

    @ApiModelProperty(value = "创建人")
    private String createdBy;

    @ApiModelProperty(value = "创建人名称")
    private String createdByName;

    @ApiModelProperty(value = "修改人")
    private String modifiedBy;

    @ApiModelProperty(value = "修改人名称")
    private String modifiedByName;

    @ApiModelProperty(value = "创建时间")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtCreated;

    @ApiModelProperty(value = "修改时间")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtModified;

    @ApiModelProperty(value = "批次规则")
    private BatchRuleVO batchRuleVO;

    @ApiModelProperty(value = "数据标识")
    private String inventoryCode;

    @ApiModelProperty(value = "是否临时库位库存;0:否；1：是")
    private Integer tempInventory;


    @ApiModelProperty(value = "容器号")
    private String containerBarCode;

    @ApiModelProperty(value = "批次规则")
    private Map<String, Object> batchRule;

    @ApiModelProperty(value = "汇总数量")
    private BigDecimal sumQuantity;

    @ApiModelProperty(value = "临时库存关联的主单号；如收货单号、发货单号")
    private String tempCode;

    @ApiModelProperty(value = "原库位号，用于作业中库存返还时操作；")
    private String oldLocation;

}
